<?php
exit;
error_reporting(E_ALL);

$start_task = 1;

$num = 2000;
$start = (10*$num)*$start_task;

$handle1 = popen('php index.php /Message/NewSong/sendnewsong/start/0/end/1000', 'r');
$handle2 = popen('php index.php /Message/NewSong/sendnewsong/start/1000/end/2000', 'r');

$handle3 = popen('php index.php /Message/NewSong/sendnewsong/start/2000/end/3000', 'r');
$handle4 = popen('php index.php /Message/NewSong/sendnewsong/start/3000/end/4000', 'r');
$handle5 = popen('php index.php /Message/NewSong/sendnewsong/start/4000/end/5000', 'r');
$handle6 = popen('php index.php /Message/NewSong/sendnewsong/start/5000/end/6000', 'r');
$handle7 = popen('php index.php /Message/NewSong/sendnewsong/start/6000/end/7000', 'r');
$handle8 = popen('php index.php /Message/NewSong/sendnewsong/start/7000/end/8000', 'r');


//$handle2 = popen('php index.php /Message/Task/index', 'r');
//$handle3 = popen('php index.php /Message/Task/index', 'r');
//$handle4 = popen('php index.php /Message/Task/index', 'r');
//$handle5 = popen('php index.php /Message/Task/index', 'r');
//$handle6 = popen('php index.php /Message/Task/index', 'r');
//$handle7 = popen('php index.php /Message/Task/index', 'r');
//$handle8 = popen('php index.php /Message/Task/index', 'r');
//$handle9 = popen('php index.php /Message/Task/index', 'r');
//$handle10 = popen('php index.php /Message/Task/index', 'r');

echo "'$handle1'; " . gettype($handle1) . "\n";
//echo "'$handle2'; " . gettype($handle2) . "\n";
//echo "'$handle3'; " . gettype($handle3) . "\n";
//echo "'$handle4'; " . gettype($handle4) . "\n";
//echo "'$handle5'; " . gettype($handle5) . "\n";
//echo "'$handle6'; " . gettype($handle6) . "\n";
//echo "'$handle7'; " . gettype($handle7) . "\n";
//echo "'$handle8'; " . gettype($handle8) . "\n";
//echo "'$handle9'; " . gettype($handle9) . "\n";
//echo "'$handle10'; " . gettype($handle10) . "\n";

//sleep(20);
while(!feof($handle1) ){
    $read = fgets($handle1);
    echo $read;

    $read = fgets($handle2);
    echo $read;

    $read = fgets($handle3);
    echo $read;

    $read = fgets($handle4);
    echo $read;

    $read = fgets($handle5);
    echo $read;

    $read = fgets($handle6);
    echo $read;

    $read = fgets($handle7);
    echo $read;

    $read = fgets($handle8);
//    echo $read;
//
//    $read = fgets($handle9);
//    echo $read;
//
//    $read = fgets($handle10);
//    echo $read;
}



pclose($handle1);


?>